import request from '../axios/tools'

export const login = (params) => {
  return request({
    params,
    url: '/api/user',
    method: 'get'
  })
}
export const logout = () => {
  return request({
    url: '/api/SysUser/SignOut',
    method: 'post'
  })
}
export const gitOauthToken = (params) => {
  const user = localStorage.getItem('user');
  if (!user) {
    return null;
  } else {
    return JSON.parse(user);
  }
}